<HTML>
<HEAD>
<TITLE>HELP - unitCmd</TITLE>
<script type="text/javascript">
  var relPathToCommmon = "../../common/";
  var relPathToHelpDir = "../../common/help/";
</script>
<script type="text/javascript" src="../../common/jsdyn.js" language="JavaScript"></script>
<script type="text/javascript" src="../../common/js.js" language="JavaScript"></script>
<script type="text/javascript" src="leftmenu.js" language="JavaScript"></script>
<script type="text/javascript">
  var toSearchPage     = "_search','../../search";
  Body1();
</script>
<div class="headerPage">HELP - unitCmd</div>
<div class="path"><a href="#" OnMouseOver="link('','../../index',this)" class="pathLink">Help</A><img src="../../common/path-arrow.gif" class="path-arrow"><a href="#" OnMouseOver="link('_dir','CommandReference0',this)" class="pathLink">Command Reference</A><img src="../../common/path-arrow.gif" class="path-arrow"><span class="pathNonLink">unitCmd</span></div>
<script type="text/javascript">
 Body2();
 BodyLeftMenuStart();
WriteLeftMenu("divID772","aID772","LeftMenuActive","leftMenuLinkActive");
 BodyLeftMenuEnd();
 Body3();
</script>
<span class="tabActive"><a href="#" OnMouseOver="linkTab('_page','unitCmd0','_description',this)" class="tabLinkActive">Description</a></span>
<script type="text/javascript">
 Body4();
</script>
&nbsp;<br>
<div class="padding"><div class="userParagraph1"> Documenting units ( unit )</div>
From time to time functions or enums or other symbols need to be accessible in the global namespace. Sometimes these symbols are needed by a single class and should therefore be defined in the header file of the class. In this case the symbols will be reflected in the class documentation on the "Related" tab.<br>
<br>
</div>
<div class="padding">Sometimes however, symbols form a logical unit, offering functionality used by a number of classes in or even outside the library. In this case, the symbols should be defined in their own header file, and this file <em>could</em> be documented using the <code>\unit</code> tag.<br>
<br>
</div>
<div class="padding">This will cause an entry to be created in the <a href="#" OnMouseOver="link('_page','../Documenting/Units0',this)">Units</a> section of the navigation bar and separate pages containing description, lists of the various symbol types and pages for each symbol in the unit to be created and reachable through the Unit entry. <em><b>This is also very useful for ANSI C programs!</em></b><br>
<br>
</div>
<div class="padding"><div class="userParagraph3">Here is how to do it:</div>
  <table cellspacing=0 cellpadding=0 border=0 class="widthAndBorderMembers">
  <TR VALIGN="top">
  <TD class="paddingHeadMultiColumn2">
<pre class="codeExamples">
/*
\unit
!Headline introducing the unit.
This unit contains  ... etc.
*/

/// Typedef in a unit
typedef std::vec&lt;int&gt;   TypedefInUnit;
 
/// Function in a unit 1
void UnitFunction1();

/// Function in a unit 2
void UnitFunction2();


/// Class in a unit, also on normal classlist
class ClassInUnit
{};
</pre>  </TD>
  </TR>
  </TABLE>
<br>
<br>
</div>
<div class="padding">You don't need to specify a name to the unit tag since the unit will be named after the file it's located in, which should be a headerfile.<br>
</div>
<div class="paragraph2">Notes</div>
<div id="descNode" class="paddingMembers"><LI>Members belonging to a unit is still shown on the "Globals"-tab as well as on the units "Overview"-tab.<br>
<LI>A unit may even contain classes, in which case the classes will still appear in the classes list and on the navigation menu to the right.<br>
</div>
<div class="paragraph2">See also</div>
<div id="descSee" class="paddingMembers"><LI>Example of unit in <a href="#" OnMouseOver="link('_unit','../Example_Code/Unit_h0',this)">Unit.h</a> <br>
</div>
<script type="text/javascript">
 Body5();
Statistics("","","","","");
 Body6();
SetPageTab('_page','_description');
</script>
